import React, {memo} from 'react'
import type {ReactNode} from 'react'

// children: 组件内部传入的东西会自动变为props.children属性,ReactNode 类型:组件里面可以传文本,也可以转标签
interface IProps {
  children?: ReactNode
  name?: string,
  age?: number
}

// 告诉整个组件的类型
const My: React.FC<IProps> = (props) => {
  return (
    <div>我的</div>
  )
}
export default memo(My)